/**
 * 子线程:发送消息->主线程
 * @param k string 消息KEY  勿:_及$开头
 * @param v mixed 消息内容  可序列化值
 * @param re boolean 是否反馈  false:无
 * 		反馈: $.workerCreate()的back.re
 * @return Promise|null  null:re=false时
 * 		Promise: re=true时,值为:反馈数据
 */
$.workerPost = function(k, v=null, re=false){
	const $W=require('node:worker_threads').parentPort;
	$.worker();  let T=$.__worker, P='$worker.S', i=0;
	$.workerPost = function(k, v, re=false){
		if(!re){ $W.postMessage({k,v}); return null; }
		return new Promise(resolve => {
			const K=P+(++i)+'#'+k;  T[K]=resolve;
			if(i>9999999) i=0; $W.postMessage({k:K,v});
		});
	};
	return $.workerPost(k, v, re);
};
